//
//  BleScanCollectionViewCell.m
//  StormWatch
//
//  Created by 王岩 on 2024/8/31.
//

#import "BleScanCollectionViewCell.h"

@implementation BleScanCollectionViewCell

- (void)setMacAddress:(NSString *)address {
    if (address.length == 12) {
        NSMutableArray * arr = [[NSMutableArray alloc] init];
        for (int i = 0 ; i < 6; i ++) {
            [arr insertObject:[address substringWithRange:NSMakeRange(i * 2, 2)] atIndex:0];
        }
        self.statusLab.text = [arr componentsJoinedByString:@":"];
    }else {
        self.statusLab.text = nil;
    }
   
}


- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.layer.cornerRadius = 10;
    self.layer.borderColor = [UIColor lightGrayColor].CGColor;
    self.layer.borderWidth = 1;
    
    // Initialization code
}

@end
